﻿<UserControl x:Class="Tile"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
           Width="110" Height="110" Opacity="1">
    <UserControl.Resources>
        <RadialGradientBrush x:Key="TileBgrndRctFill" GradientOrigin="0.582,0.409">
            <RadialGradientBrush.RelativeTransform>
                <TransformGroup>
                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="2.525" ScaleY="2.525"/>
                    <SkewTransform AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5"/>
                    <RotateTransform Angle="0" CenterX="0.5" CenterY="0.5"/>
                    <TranslateTransform X="0.378" Y="-0.378"/>
                </TransformGroup>
            </RadialGradientBrush.RelativeTransform>
            <GradientStop Color="#FF0D559F" Offset="0"/>
            <GradientStop Color="#FF064484" Offset="1"/>
        </RadialGradientBrush>
        <Storyboard x:Key="OnMouseEnter1">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="TileSurfaceRct" Storyboard.TargetProperty="(UIElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.14"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="OnMouseLeave1">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="TileSurfaceRct" Storyboard.TargetProperty="(UIElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.14"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="Mouse.MouseEnter">
            <BeginStoryboard Storyboard="{StaticResource OnMouseEnter1}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="Mouse.MouseLeave">
            <BeginStoryboard Storyboard="{StaticResource OnMouseLeave1}" x:Name="OnMouseLeave1_BeginStoryboard"/>
        </EventTrigger>
    </UserControl.Triggers>

    <Grid x:Name="LayoutRoot">
        <Rectangle Stroke="{x:Null}" x:Name="TileBgrndRct" Fill="{DynamicResource TileBgrndRctFill}"/>
        <TextBlock Margin="13,13,18,34" HorizontalAlignment="Center"  x:Name="TileTxtBlck" FontSize="12" Foreground="#FFFFFFFF" Text="POS" TextWrapping="Wrap" FontWeight="SemiBold"/>
        <Image HorizontalAlignment="Left" Margin="15,0,0,8" x:Name="TileIcon" VerticalAlignment="Bottom" Width="48" Height="48" Stretch="Uniform"/>
        <Rectangle x:Name="TileSurfaceRct" Fill="#FF000000" Opacity="0" Stroke="#FFFBFBFB"/>
    </Grid>
</UserControl>
